package com.gmail.hy87cn.hellohi.client;

import com.gmail.hy87cn.hellohi.shared.HiMessage;
import com.gmail.hy87cn.hellohi.shared.HiRoom;
import com.gmail.hy87cn.hellohi.shared.HiUpdateException;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("chat")
public interface HiService extends RemoteService {
	int getToken();

	HiMessage[] updateMessages(int token, int lastIndex) throws HiUpdateException;

	void sendMessage(int token, String input);

	void connect(int token, String facebookId);

	void disconnect(int token);

	void releaseToken(int token);

	HiRoom getRoom(int token);
}
